/*
 * @Descripttion:
 * @Author: voanit
 * @Date: 2022-03-22 17:22:16
 * @LastEditors: voanit
 * @LastEditTime: 2022-03-22 18:37:53
 */
import { CHANNEL_GET, CHANNEL_ACTIVE, CHANNEL_NEWS } from '../actionTypes' // export const CHANNEL_GET = 'channel/get'
export default function channel(
  state = {
    channel: [],
    id: 0,
  },
  action
) {
  switch (action.type) {
    case CHANNEL_GET:
      return { ...state, channel: action.payload }
    case CHANNEL_ACTIVE:
      return { ...state, id: action.payload }
    default:
      return state
  }
}
